﻿using ExceptionHandlingDemo.Api.Infrastructures.Exceptions;

namespace ExceptionHandlingDemo.Api.Extensions
{
    public static class AuthorizationExceptions
    {
        public static void AddAuthenticationServices(this IServiceCollection services, int value = 0)
        {
            if(value == 1)
            {
                throw new ConfigurationServiceException("Configuration AddAuthenticationServices is error");
            }

            services.AddAuthorization();
        }
    }
}
